#ifndef _DICOM_HIPPA_H_
#define _DICOM_HIPPA_H_

#include <gwbase/base/logging.h>
#include <gwbase/base/timestamp.h>
#include "dicom/dicom_conf.h"
#include "dicom/dmv_db.h"
#include "dicom/session.h"

namespace dicom {

enum OperationCode {
  OP_LOGIN,
  OP_LOGOUT,
  OP_UPLOAD_FILE,
  OP_DELETE_FILE,
  OP_DOWNLOAD_FILE,
  OP_CREATE_DIR,
  OP_DELETE_DIR,
  OP_LIST_FILE,
  OP_STAT_FILE,
  OP_RENAME_FILE,
  OP_RENAME_DIR,
  OP_NONE
};

extern void InitHippaLog(const DicomConf* conf);

extern void LogHippaOperation(OperationCode code, DmvDBPtr& db,
                              const CredentialPtr& cred,
                              const std::string dir_id, const std::string name,
                              const std::string new_dir_id = "",
                              const std::string new_name = "");

extern void LogHippaAccountOperation(OperationCode code,
                                     const std::string& email,
                                     const std::string& ukey_id);
}

#endif  // _DICOM_HIPPA_H_
